using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using JSG.BubbleShoot;
namespace JSG.BubbleShoot
{
    public class EditorRing : MonoBehaviour
    {
        public float m_Radius = 40;

        public EditorBallBase[] m_Balls;
        // Start is called before the first frame update
        void Start()
        {

        }

        // Update is called once per frame
        void Update()
        {

        }

        public void SetColor(int num)
        {
            for (int i = 0; i < m_Balls.Length; i++)
            {
                m_Balls[i].SetColor(num);
            }
        }

        public void SetColor2(int colorCount)
        {
            int total = m_Balls.Length / colorCount;
            int colorCounter = 0;
            for (int i = 0; i < m_Balls.Length; i++)
            {
                if (colorCount > total)
                    colorCounter = 0;

                int num = (i / colorCount);
                num = num % 5;
                m_Balls[i].SetColor(num);
            }
        }

        public void SetColorPart(int start, int count, int color)
        {

            for (int i = 0; i < count; i++)
            {
                m_Balls[start + count].SetColor(color);
            }
        }
    }
}